#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<unordered_map>
#include<deque>
using namespace std;

class Solution {
public:
    int findMaxLength(vector<int>& nums) {
        unordered_map<int, int> hash;
        hash[0] = -1;
        int sum = 0, ans = 0;
        for (int i = 0; i < nums.size(); ++i)
        {
            sum += nums[i] == 0 ? -1 : 1;
            if (!hash.count(sum))
                hash[sum] = i;
            ans = max(ans, i - hash[sum]);
        }
        return ans;
    }

    int firstMissingPositive(vector<int>& nums) {
        int n = nums.size();
        for (int& num : nums)
            if (num <= 0)
                num = n + 1;

        for (int i = 0; i < n; ++i)
        {
            int num = abs(nums[i]);
            if (num <= n)
                nums[num - 1] = -abs(nums[num - 1]);
        }
        for (int i = 0; i < n; ++i)
            if (nums[i] > 0)
                return i + 1;
        return n + 1;
    }

    int maximumRobots(vector<int>& chargeTimes, vector<int>& runningCosts, long long budget) {
        int ans = 0, left = 0;
        long long sum = 0;
        deque<int> q;
        for (int right = 0; right < chargeTimes.size(); ++right)
        {
            while (!q.empty() && chargeTimes[right] > chargeTimes[q.back()])
                q.pop_back();
            q.push_back(right);
            sum += runningCosts[right];
            while (!q.empty() && chargeTimes[q.front()] + (right - left + 1) * sum > budget)
            {
                if (q.front() == left)
                    q.pop_front();
                sum -= runningCosts[left++];
            }
            ans = max(ans, right - left + 1);
        }
        return ans;
    }

    vector<vector<int>> matrixBlockSum(vector<vector<int>>& mat, int k) {
        int m = mat.size(), n = mat[0].size();
        vector<vector<int>> dp(m + 1, vector<int>(n + 1, 0));
        vector<vector<int>> ans(m, vector<int>(n, 0));
        for (int i = 1; i <= m; ++i)
        {
            for (int j = 1; j <= n; ++j)
            {
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1] - dp[i - 1][j - 1] + mat[i - 1][j - 1];
            }
        }

        for (int i = 0; i < m; ++i)
        {
            for (int j = 0; j < n; ++j)
            {
                int x1 = max(0, i - k) + 1, y1 = max(0, j - k) + 1;
                int x2 = min(m - 1, i + k) + 1, y2 = min(n - 1, j + k) + 1;
                ans[i][j] = dp[x2][y2] - dp[x2][y1 - 1] - dp[x1 - 1][y2] + dp[x1 - 1][y1 - 1];
            }
        }
        return ans;
    }
};

int main()
{
    int cnt = 1;
    vector<vector<int>> vv(3,vector<int>(3,0));
    for (int i = 0; i < 3; ++i)
    {
        for (int j = 0; j < 3; ++j)
        {
            vv[i][j] = cnt++;
        }
    }
    for (int i = 0; i < 2; ++i)
    {
        for (int j = 0; j < 3; ++j)
        {
            cout << vv[i+1][j];
        }
    }
    return 0;
}